<%--
  Created by IntelliJ IDEA.
  User: 30590
  Date: 2024/10/12
  Time: 10:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%request.setCharacterEncoding("utf-8");%>
<jsp:useBean id="ps" class="com.example.moon.javabean.Person" scope="page"/>
<!--在这里因为前面form中的name,sex,age和JavaBean中的一样,所以进行了自动匹配,property="*",表示匹配的属性是所有的-->
姓名<jsp:setProperty name="ps" property="name"/><br>
性别<jsp:setProperty name="ps" property="sex"/><br>
年龄<jsp:setProperty name="ps" property="age"/><br>
</body>
</html>
